import { http } from "@/utils/http";
import type { HttpResult } from "@/utils/http/types";

export function queryDocTable(params) {
  return http.request<HttpResult>("get", "/admin/doc/get/table", {
    params: params
  });
}

export function queryDocList(params) {
  return http.request<HttpResult>("get", "/admin/doc/get/list", {
    params: params
  });
}

export function queryDoc(id) {
  return http.request<HttpResult>("get", `/admin/doc/get/${id}`);
}

export function deleteDoc(ids) {
  return http.request<HttpResult>("post", `/admin/doc/delete/${ids}`);
}

export function addDoc(params) {
  return http.request<HttpResult>("post", "/admin/doc/insert", {
    data: params
  });
}

export function updateDoc(params) {
  return http.request<HttpResult>("post", "/admin/doc/update", {
    data: params
  });
}
